package com.dmg.sp.controller;


import com.dmg.sp.service.LoginService;
import com.dmg.sp.utils.Result;
import com.dmg.sp.vo.LoginVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    /**
     * 登录
     * @param vo
     * @return
     */
    @PostMapping("/dengLu")
    public Result dengLu(@RequestBody LoginVo vo){
        return loginService.login(vo);
    }
}
